﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace CMSMVC4.Areas.Main.Models
{
    public class FeedBackModel
    {
        [Display(ResourceType = typeof(MultiResource.Resource), Name = "FeedBack_Name_Display")]
        [Required(ErrorMessageResourceType = typeof(MultiResource.Resource), ErrorMessageResourceName = "FeedBack_Name_Required")]
        public string name { get; set; }

        [Display(ResourceType = typeof(MultiResource.Resource), Name = "FeedBack_Email_Display")]
        [Required(ErrorMessageResourceType = typeof(MultiResource.Resource), ErrorMessageResourceName = "FeedBack_Email_Required")]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessageResourceType = typeof(MultiResource.Resource), ErrorMessageResourceName = "FeedBack_Email_RegularExpression")]
        public string email { get; set; }

        [Display(ResourceType = typeof(MultiResource.Resource), Name = "FeedBack_Phone_Display")]
        [Required(ErrorMessageResourceType = typeof(MultiResource.Resource), ErrorMessageResourceName = "FeedBack_Phone_Required")]
        [RegularExpression(@"[0-9]*", ErrorMessageResourceType = typeof(MultiResource.Resource), ErrorMessageResourceName = "FeedBack_Phone_Required")]
        public string phone { get; set; }

        [Display(ResourceType = typeof(MultiResource.Resource), Name = "FeedBack_Data_Display")]
        [Required(ErrorMessageResourceType = typeof(MultiResource.Resource), ErrorMessageResourceName = "FeedBack_Data_Required")]
        public string data { get; set; }
    }
}